import Axios from "axios";
import Qs from 'qs'
export default {
    /**
     * 获取过滤器列表
     */
    selectFliter: function ({taskId,currentPage,pageSize}) {
            const params={
            pageNum : currentPage,
            pageSize : pageSize,
            taskId : taskId
            };
       return Axios.post('/crawler/api/filter/selectFliterPageListByTaskId',Qs.stringify(params),{headers: {'Content-Type': 'application/x-www-form-urlencoded'}});
    },
    insertFilter : function (params){
       return Axios.post('/crawler/api/filter/insert', params);
    },
    updateFilter : function (params){
       return Axios.post('/crawler/api/filter/updateByTaskIdAndRegexAndRuleSelective',params);
    },
    deleteFilter : function (params){
       return Axios.post('/crawler/api/filter/deleteByTaskIdAndRegexAndRule', params);
    }

}
